package com.lframework.xingyun.basedata.mappers;

import com.lframework.starter.web.core.mapper.BaseMapper;
import com.lframework.xingyun.basedata.entity.ProductSpec;
import com.lframework.xingyun.basedata.vo.product.spec.QueryProductSpecVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * 商品规格表 Mapper 接口
 * </p>
 *
 */
@Mapper
public interface ProductSpecMapper extends BaseMapper<ProductSpec> {

    /**
     * 查询列表
     * @param vo
     * @return
     */
    default List<ProductSpec> query(QueryProductSpecVo vo) {
        return defaultJoinWrapper()
                .eq(ProductSpec::getProductId, vo.getProductId())
                .list();
    }
}

